import React ,{ useState,useEffect } from 'react'

const FuncClass =props=>{
    console.log('props',props)
    let [num,setNum] = useState(0)
    useEffect(()=>{

    },[])
    const add = ()=>{
        setNum(num+1)
    }
    return (
        <div>
            <h4>函数式组件:{num}</h4>
            <button onClick={add}>点我+1</button>
        </div>
    )
}
export default FuncClass